package com.cuijq.dubbo.core.config;

import com.cuijq.dubbo.core.server.NettyServerHandle;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.nio.NioEventLoopGroup;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ServerConfig {
    @Bean
    public ServerBootstrap server() {
        return new ServerBootstrap();
    }

    @Bean
    public NioEventLoopGroup boss() {
        return new NioEventLoopGroup();
    }

    @Bean
    public NioEventLoopGroup serverWorker() {
        return new NioEventLoopGroup();
    }

    @Bean
    public NettyServerHandle nettyServerHandle(){
        return new NettyServerHandle();
    }
}